#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>
#include<string.h>

void adjust(int arr[], int n)
{
	int i = 0;
	int j = 0;
	int temp = 0;
	for(i = 0;i<n;i++)
	{
		for (j = 0; j < n - i - 1; j++)
		{
			if (arr[j] % 2 == 0&&arr[j+1]%2!=0)
			{
				temp = arr[j];
				arr[j] = arr[j + 1];
				arr[j + 1] = temp;
			}
		}
	}
}


int main()
{
	int arr[] = { 0,1,2,3,4,5,6,7,8,9 };
	int n = sizeof(arr) / sizeof(arr[0]);
	int i = 0;
	adjust(arr,n);
	for (i = 0; i < n; i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}